import React from "react";
import { Link,useParams, useLocation, useNavigate } from "react-router-dom"
function withRouter(Component) {
    return (props) => (
        <Component
            {...props}
            params={useParams()}
            location={useLocation()}
            navigate={useNavigate()}
        />
    );
}
class About extends React.Component {
    constructor() {
        super()
    }
    render() {
        return <div>
            <ul>
                <li>
                    <Link to="/cinfo?id=1">列表一</Link>
                </li>
                <li>
                    <Link to="/cinfo?id=1">列表二</Link>
                </li>
                <li>
                    <Link to="/cinfo?id=1">列表三</Link>
                </li>
            </ul>
        </div>
    }
}
export default withRouter(About)